import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home/Home.vue'
import Login from '@/views/user/Login.vue'
import Register from '@/views/user/Register.vue'
import ResetPassword from '@/views/user/ResetPassword.vue'

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    meta: { useLayout: true }
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
    meta: { useLayout: false }
  },
  {
    path: '/register',
    name: 'Register',
    component: Register,
    meta: { useLayout: false }
  },
  {
    path: '/reset-password',
    name: 'ResetPassword',
    component: ResetPassword,
    meta: { useLayout: false }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
